pid=`pidof $1`
echo ${pid}
mkdir -p smaps_exe_file && cd smaps_exe_file
if [ "`ls ./`" != "" ]; then `rm -rf ./*.txt`; fi
while true
do
    pid=`pidof $1`
    if [ -z "${pid}" ]; then break; fi
    timeMs=$(date +%s%N)
    smap_file=$1"_smaps_"${timeMs}.txt
    cat /proc/${pid}/smaps > ${smap_file}
    sleep 0.03
done